package org.sage.sdk.dada.order.aggregate;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.sage.sdk.dada.infrastructure.common.BaseEntity;
import org.sage.sdk.dada.infrastructure.common.annotation.Aggregate;
import org.sage.sdk.dada.infrastructure.common.attributes.*;

import javax.validation.constraints.NotNull;

/**
 * 订单
 *
 * @author 周广明
 * @version v1 2019/12/10 下午6:13
 */
@Getter
@Setter
@Aggregate
@NoArgsConstructor
public abstract class Order implements BaseEntity {


    public Order(ShopNo shopNo, Origin origin, CityCode cityCode, Cargo cargo,
                 IsPrepay isPrepay, Receiver receiver, Callback callback) {
        this.shopNo = shopNo;
        this.origin = origin;
        this.cityCode = cityCode;
        this.cargo = cargo;
        this.isPrepay = isPrepay;
        this.receiver = receiver;
        this.callback = callback;
    }

    @NotNull
    ShopNo shopNo;

    @NotNull
    Origin origin;

    @NotNull
    CityCode cityCode;

    @NotNull
    Cargo cargo;

    @NotNull
    IsPrepay isPrepay;

    @NotNull
    Receiver receiver;

    @NotNull
    Callback callback;

    Tips tips;

    Info info;

    InvoiceTitle invoiceTitle;

    IsUseInsurance isUseInsurance;

    IsFinishCodeNeeded isFinishCodeNeeded;

    DelayPublishTime delayPublishTime;

    IsDirectDelivery isDirectDelivery;

}
